#ifndef _SUBSCRIPT_H_
#define _SUBSCRIPT_H_
#include "python3/PythonGrammar30TreeConstants.h"
#include "ast/exprType.h"
#include "ast/sliceType.h"
#include "ast/exprContextType.h"
#include "AstTypes.h"
class IVisitor;
class Subscript;
typedef QSharedPointer<Subscript> SubscriptPtr;

class Subscript: public exprType
{
public:
    explicit Subscript(const exprTypePtr& value, const sliceTypePtr& slice, int ctx, int nodeId=JJTINDEX_OP);
    virtual ~Subscript();
    
    
    exprTypePtr value();
    void setValue(const exprTypePtr& value);
    
    sliceTypePtr slice();
    void setSlice(const sliceTypePtr& slice);
    
    int ctx();
    void setCtx(int ctx);
    
    
    virtual Ast::AstTypes type() const;
    virtual QString toString() const;
    virtual void accept(IVisitor* visitor, const SimpleNodePtr& node);
    virtual void traverse(IVisitor* visitor);
private:
    exprTypePtr _value;
    sliceTypePtr _slice;
    int _ctx;
};




#endif